
#include "OperationSub.h"

using namespace npFactoryMethod;


OperationSub::OperationSub() : Operation()
{

}

OperationSub::~OperationSub()
{

}

OperationSub::OperationSub(const OperationSub& cpy) : Operation(cpy)
{

}

OperationSub& OperationSub::operator=(const OperationSub& asn)
{
    if (this == &asn)
    {
        return *this;
    }
    else
    {
        Operation::operator=(asn);
        return *this;
    }
}

OperationSub* OperationSub::clone() const
{
    return new OperationSub(*this);
}

int OperationSub::getResult() const
{
    return this->getFirstNum() - this->getSecondNum();
}
